<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" href="css/front.css" rel="stylesheet" />
<link type="text/css" href="css/main.css" rel="stylesheet" />
<link type="text/css" href="css/home.css" rel="stylesheet" />
<link href="css/alert.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
<script type="text/javascript" src="common/JsSupport.js"></script>
<title>记账本</title>
</head>
<body>

	<div>
		<s:form id="newForm">
			<table>
				<tr>
					<td><span style="color: red">*</span>名称：</td>
					<td><s:textfield theme="simple" id="accountName" name="account.accountName" cssClass="txt_input" class='theme' />
					</td>
					<td></td>
				</tr>
				<tr>
					<td><span style="color: red">*</span>账户类型：</td>
					<td><s:select id="accountType" name="account.accountType" list="#{0:'现金账户', 1:'信用卡账户', 2:'金融账户', 3:'虚拟账户', 4:'负债账户', 5:'债权账户'}" >
							
					</s:select></td>
					<td></td>
				</tr>
				<tr>
					<td><span style="color: red">*</span>币种：</td>
					<td><select id="currency" name="account.currency.id">
							<s:iterator value="currencyList">
								<option value='<s:property value="id"/>'>
									<s:property value="contentName" />
								</option>
							</s:iterator>
					</select></td>
					<td></td>
				</tr>
				<tr>
					<td><input type="button" id="submit" value="提交" class='theme' /></td>
					<td><input type="button" id="continueAdd" value="继续添加" class='theme' />
					</td>
					<td><input type="button" id="close" value="关闭" class='theme' /></td>
				</tr>
			</table>
		</s:form>
	</div>

</body>
<script type="text/javascript">
	$(function() {
		/**
		 * 提交
		 */
		$('#submit').click(
				function() {
					window.parent.submitNewAccountDialog($('#newForm').serialize());
				});
		/**
		 * 继续添加
		 */
		$('#continueAdd').click(
				function() {
					window.parent.continueAddData($('#newForm').serialize());
					$('#accountName').val("");
				});

		$('#close').click(function() {
			window.parent.closeNewAccountDialog();
		});
	});
</script>
</html>